import { observable, action, computed } from 'mobx'
import { get } from '@/src/utils/http'

class AppStore {
  @observable list = []

  @observable isShow = true

  @computed
  get swiper() {

  }

  @action
  setList(data) {
    this.list = data;
  }

  @action
  async getList() {
    let result = await get('http://192.168.2.1:8088/hotlist')
    this.setList(result)
  }

  @action
  setVisible(status) {
    this.isShow = status;
  }

}

export default new AppStore()